package com.example.commonexport.model;

import lombok.Data;
import org.springframework.stereotype.Component;

@Component
@Data
public class Response {
    int code;
    String msg;
    Object data;

    public static Response success(String msg){
        Response res= new Response();
        res.code = 0;
        return res;
    }

    public boolean isSuccess(){
        return this.code == 0;
    }
}
